<?php

require_once 'log4php/Logger.php';

//Esto es necesario apra que el logger muestr la hora
date_default_timezone_set("Europe/Madrid"); //En vez de hacer esto, se puede fijar la variable date.timezone del fichero php.ini

// Tell log4php to use our configuration file.

Logger::configure('config.xml');

// Fetch a logger, it will inherit settings from the root logger
$log = Logger::getLogger('dawPCLogger');

// Start logging
//Pruebas. Descomentar para probar
//$log->trace("My first message."); // Not logged because TRACE < WARN
//$log->debug("My second message."); // Not logged because DEBUG < WARN
//$log->info("My third message."); // Not logged because INFO < WARN
//$log->warn("My fourth message."); // Logged because WARN >= WARN
//$log->error("My fifth message."); // Logged because ERROR >= WARN
//$log->fatal("My sixth message."); // Logged because FATAL >= WARN
  

?>